home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 62 / Quick PC 62.iso / I386 / SETPATHS.CM_ / SETPATHS.CMD
Encoding:
Text File  |  1999-08-12  |  2.5 KB  |  61 lines

  1. REM ###############################################################
  2. REM #                                                             #
  3. REM # SetPaths                                                    #
  4. REM #                                                             #
  5. REM # Extracts the following paths into environment variables,    #
  6. REM # allowing the scripts to run without hardcoded system path   #
  7. REM # strings.  This allows the scripts to run independently of   #
  8. REM # system language.                                            #
  9. REM #                                                             #
  10. REM # All Users:Startup           COMMON_STARTUP            #
  11. REM # All Users:Start Menu              COMMON_START_MENU         #
  12. REM # All Users:Start Menu\Programs    COMMON_PROGRAMS           #
  13. REM # Current User:Start Menu        USER_START_MENU           #
  14. REM # Current User:Startup        USER_STARTUP              #
  15. REM # Current User:Start Menu\Programs    USER_PROGRAMS             #
  16. REM # Current User:My Documents         MY_DOCUMENTS              #
  17. REM # Current User:Templates            TEMPLATES                 #
  18. REM # Current User:Application Data     APP_DATA
  19. REM #                                                             #
  20. REM ###############################################################
  21.  
  22. REM ###############################################################
  23. REM # Use the GETPATHS option to set all of the environment variables
  24. REM ###############################################################
  25. "%systemroot%\Application Compatibility Scripts\ACRegL.exe" "%TEMP%\getpaths.cmd" COMMON_PATHS "HKLM\Software" "" GETPATHS
  26.  
  27. If Not ErrorLevel 1 Goto Cont1
  28. Echo.
  29. Echo Unable to retrieve common or user paths.
  30. Echo.
  31. Goto Failure
  32.  
  33. :Cont1
  34. Call "%TEMP%\getpaths.cmd"
  35. Del "%TEMP%\getpaths.cmd" >Nul: 2>&1
  36.  
  37. REM If the values below are correct, execution has succeeded
  38. REM     COMMON_START_MENU = %COMMON_START_MENU%
  39. REM     COMMON_STARTUP = %COMMON_STARTUP%
  40. REM     COMMON_PROGRAMS = %COMMON_PROGRAMS%
  41. REM     USER_START_MENU = %USER_START_MENU%
  42. REM     USER_STARTUP = %USER_STARTUP%
  43. REM     USER_PROGRAMS = %USER_PROGRAMS%
  44. REM     MY_DOCUMENTS = %MY_DOCUMENTS%
  45. REM     TEMPLATES = %TEMPLATES%
  46. REM     APP_DATA= %APP_DATA%
  47. Set _SetPaths=SUCCEED
  48. Goto Done
  49.  
  50. :Failure
  51. Echo.
  52. Echo One or more queries for the common or user paths have failed!
  53. Echo Applications relying on this script may not install successfully.
  54. Echo Please resolve the problem and try again.
  55. Echo.
  56. Set _SetPaths=FAIL
  57. REM Pause
  58. Goto Done
  59.  
  60. :Done
  61.